package com.winter.main.mapper.master;

import com.winter.main.model.entity.Dept;
import com.winter.main.utils.MyMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

public interface DeptMapper extends MyMapper<Dept> {

    @Select({"<script>",
            "select id,dept_code AS deptCode,dept_name as deptName " ,
            "from t_dept " ,
            "where 1=1 " ,
            "<when test='id != null'>",
            "and id=#{id}",
            "</when>",
            "<when test='deptCode != null'>",
            "and dept_code=#{deptCode}",
            "</when>",
            "<when test='deptName != null'>",
            "and dept_name=#{deptName}",
            "</when>",
            "</script>"})
    List<Dept> findDept(Dept dept);
    
    
}